GSheets - Cleanup Spreadsheet
(17 actions, 12 KB)
0 Comment
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/sheets#Sheet
1 Run Shortcut
Get Spreadsheet
»
Input
:
[Shortcut Input]
Workflow
:
{ "workflowIdentifier": "0D603809-4C0E-4AAC-BD7F-130E53B7D50B", "workflowName": "Get Spreadsheet", "isSelf": false }
2 Get Dictionary Value for
sheets
in
[1 Shortcut Result]
➔ sheets
»
3
4
6
3 If
[2 sheets]
has any value
4 Count Items in
[2 sheets]
»
5 If
[4 Count]
>
1
6 Repeat with Each in
[2 sheets]
7 Get Dictionary Value for
properties.sheetId
in
[Repeat Item]
»
8 Dictionary »
10
12
{ "spreadsheetId": "
[Shortcut Input]
", "sheetId": "
[7 Dictionary Value]
" }
9 If
[Repeat Index]
is
1
10 Run Shortcut
Unhide Sheet
Input
:
[8 Dictionary]
Workflow
:
{ "workflowIdentifier": "AACF3A26-062F-4F4D-9A41-31DF05FAEEDC", "workflowName": "Unhide Sheet", "isSelf": false }
11 Otherwise
12 Run Shortcut
Delete Sheet
Input
:
[8 Dictionary]
Workflow
:
{ "workflowIdentifier": "141D3E16-2D5B-4FE7-99D5-3A4E612D8B25", "workflowName": "Delete Sheet", "isSelf": false }
13 End If
14 End Repeat with Each ▵
6
15 End If ▵
5
16 End If ▵
3